<!DOCTYPE html>
<html lang="zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
<title>登录11</title>
	<link >
	<link rel="stylesheet" href="/css/pintuer.css"/>
	<link rel="stylesheet" href="/css/admin.css"/>

	<script src="/js/vue.js"></script>
	<script src="/js/axios.min.js"></script>

<script type="text/javascript">

</script>
</head>
<body>
<div id="app">
	<div class="bg"></div>
	<div class="container">
		<div class="line bouncein">
			<div class="xs6 xm4 xs3-move xm4-move">
				<div style="height:150px;"></div>
				<div class="media media-y margin-big-bottom"></div>
				<span text="${msg}"></span>
				<form  :model="form" target="_top">
					<input type="hidden" name="opr" value="" />
					<div class="panel loginbox">
						<div class="text-center margin-big padding-big-top">
							<h1>蜗牛K15后台管理中心</h1>
						</div>
						<div class="panel-body"
							style="padding:30px; padding-bottom:10px; padding-top:10px;">
							<div class="form-group">
								<div class="field field-icon-right">
									<input v-model="form.account" type="text" class="input input-big" name="account"
										placeholder="登录账号" value="admin"/> <span
										class="icon icon-user margin-small"></span>
									<span>{{accountMsg}}</span>
								</div>
							</div>
							<div class="form-group">
								<div class="field field-icon-right">
									<input v-model="form.password" type="password" class="input input-big" name="password"
										placeholder="登录密码" value="123456" /> <span
										class="icon icon-key margin-small"></span>
									<span>{{passwordMsg}}</span>
								</div>
							</div>


						</div>
						<div style="padding:30px;">
							<input type="button" @click="login()"
								class="button button-block bg-main text-big input-big"
								value="登录">
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
</body>
<script>
	new Vue({
		el: "#app",
		data:{
			form:{
				account:'',
				password:''
			},
			accountMsg:'',
			passwordMsg:''
		},

		methods: {
			/*后台登录*/
			login(){
				this.accountMsg="";
				this.passwordMsg=""

				let manager={
					account:this.form.account,
					password:this.form.password
				}

				axios.post("/admin/manager/login",manager).then(r=>{
					if(r.data.code==200){
						alert("登录成功")
					}else if(r.data.code==404){
						this.accountMsg="账户不存在";
					}else{
						this.passwordMsg="密码错误"
					}

				}).catch(err=>{
					console.log(err)
				})
			},

			/**
			 * 根据orderId查看评论
			 */
			show_review(orderId){
				axios.get("/order/showReview?orderId="+orderId).then(r => {
					if (r.data.code === 200) {
						this.review = r.data.data;




					}
				})
			},

		},



		mounted: function () {

		}
	});
</script>
</html>